package com.cloudpivot.receivales.contract.service.impl;

import com.cloudpivot.receivales.contract.entity.erpcontract.MiddleEntity;
import com.cloudpivot.receivales.contract.repository.erpcontract.U8MiddleRepository;
import com.cloudpivot.receivales.contract.util.StrUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * U8 中间表 处理
 */
@Service
@Slf4j
public class ErpMiddleServiceImpl {

    @Autowired
    private U8MiddleRepository u8MiddleRepository;

    public void addU8MiddleResult(String u8Id,String crmId) {
        MiddleEntity entity = new MiddleEntity();
        entity.setCAccId("111");
        entity.setDCreateDate(StrUtil.getNowDateTime());
        entity.setCRMId(crmId);
        entity.setU8Id(u8Id);

        u8MiddleRepository.addU8ResultToMiddle(entity);
    }
}
